import request from '@/utils/request'

// 查询维修工单列表
export function listMaintenanceorder(query) {
  return request({
    url: '/maintenanceorder/maintenanceorder/list',
    method: 'get',
    params: query
  })
}

// 查询维修工单详细
export function getMaintenanceorder(id) {
  return request({
    url: '/maintenanceorder/maintenanceorder/' + id,
    method: 'get'
  })
}

// 新增维修工单
export function addMaintenanceorder(data) {
  return request({
    url: '/maintenanceorder/maintenanceorder',
    method: 'post',
    data: data
  })
}

// 修改维修工单
export function updateMaintenanceorder(data) {
  return request({
    url: '/maintenanceorder/maintenanceorder',
    method: 'put',
    data: data
  })
}

// 删除维修工单
export function delMaintenanceorder(id) {
  return request({
    url: '/maintenanceorder/maintenanceorder/' + id,
    method: 'delete'
  })
}
